{{ header }} {{ column_left }} 
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
    {% if error_warning %} 
    <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }} 
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    {% endif %} 
    {% if success %} 
    <div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }} 
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    {% endif %}     
      <div class="pull-right">
        <button type="submit" form="form-ppexpress" data-toggle="tooltip" title="{{ button_save }} " class="btn btn-primary"><i class="fa fa-save"></i></button>
        <a href="{{ cancel }} " data-toggle="tooltip" title="{{ button_cancel }} " class="btn btn-default"><i class="fa fa-reply"></i></a></div>
      <h1>{{ heading_title }} </h1>
      <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %} 
        <li><a href="{{ breadcrumb.href }} ">{{ breadcrumb.text }} </a></li>
        {% endfor %} 
      </ul>
    </div>
  </div>
  <div class="container-fluid">
    {% if error.error_warning %} 
    <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error.error_warning }} 
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    {% endif %} 
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-pencil"></i>Module settings</h3>
      </div>
      <div class="panel-body">
        <form action="{{ action }} " method="post" enctype="multipart/form-data" id="form-multiimage" class="form-horizontal">
          <ul class="nav nav-tabs">
            <li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }} </a></li>
            <li><a href="#tab-volumes" data-toggle="tab">{{ tab_volume }} </a></li>
            <li><a href="#tab-modules" data-toggle="tab">{{ tab_module }} </a></li>  
            <li><a href="#tab-about" data-toggle="tab">{{ tab_help }} </a></li>
          </ul>
          <div class="tab-content">
            <div class="tab-pane active" id="tab-general">
             <fieldset>
              <legend>{{ 'General Settings' }} </legend>

              <div class="tab-pane active" id="tab-api-details">
              <div class="form-group">
                <label class="col-sm-2 control-label" for="input-status">{{ entry_status }} </label>
                <div class="col-sm-2">
                  <select name="pim_status" id="input-status" class="form-control">
                    {% if pim_status %} 
                    <option value="1" selected="selected">{{ text_enabled }} </option>
                    <option value="0">{{ text_disabled }} </option>
                    {% else %}   
                    <option value="1">{{ text_enabled }} </option>
                    <option value="0" selected="selected">{{ text_disabled }} </option>
                    {% endif %}  
                  </select>
                </div>
              </div>                  
              <div class="form-group">
                <label class="col-sm-2 control-label" for="input-status">{{ entry_miu_patch }} </label>
                <div class="col-sm-2">
                  <select name="pim_miu" id="input-status" class="form-control">
                    {% if pim_miu %} 
                    <option value="1" selected="selected">{{ text_enabled }} </option>
                    <option value="0">{{ text_disabled }} </option>
                    {% else %}   
                    <option value="1">{{ text_enabled }} </option>
                    <option value="0" selected="selected">{{ text_disabled }} </option>
                    {% endif %}  
                  </select>
                </div>
              </div>          
              </div>
              </fieldset>
              <fieldset>
              <legend>{{ 'Server Settings' }} </legend>
              <div class="form-group">
                <label class="col-sm-2 control-label" for="input-status">{{ entry_delete_def_image }} </label>
                <div class="col-sm-4">
                  <select name="pim_deletedef" id="input-status" class="form-control">
										{% if pim_deletedef %} 
                    <option value="1" selected="selected">{{ text_yes }} </option>
                    <option value="0">{{ text_no }} </option>
                    {% else %}   
                    <option value="1">{{ text_yes }} </option>
                    <option value="0" selected="selected">{{ text_no }} </option>
                    {% endif %}  								
                  
                  </select>
                </div>
              </div>                  
              <div class="form-group">
                <label class="col-sm-2 control-label" for="input-status">{{ entry_copyOverwrite }} </label>
                <div class="col-sm-4">
                  <select name="pim_copyOverwrite" id="input-status" class="form-control">
                  {% if pim_copyOverwrite %} 
                  <option value="1" selected="selected">{{ text_yes }} </option>
                  <option value="0">{{ text_no }} </option>
                  {% else %}   
                  <option value="1">{{ text_yes }} </option>
                  <option value="0" selected="selected">{{ text_no }} </option>
                  {% endif %}  
                  </select>
                </div>
              </div>          
              <div class="form-group">
                <label class="col-sm-2 control-label" for="input-status">{{ entry_uploadOverwrite }} </label>
                <div class="col-sm-4">
                  <select name="pim_uploadOverwrite" id="input-status" class="form-control">
                  {% if pim_uploadOverwrite %} 
                  <option value="1" selected="selected">{{ text_yes }} </option>
                  <option value="0">{{ text_no }} </option>
                  {% else %}   
                  <option value="1">{{ text_yes }} </option>
                  <option value="0" selected="selected">{{ text_no }} </option>
                  {% endif %}  
                  </select>
                </div>
              </div>                  
              <div class="form-group">
                <label class="col-sm-2 control-label" for="input-status">{{ entry_uploadMaxSize }} </label>
                <div class="col-sm-2">
                   <input type="text" class="form-control" name="pim_uploadMaxSize" value="{{ pim_uploadMaxSize }} " size="4" />
                </div>
                <div class="col-sm-2"><select name="pim_uploadMaxType" id="input-status" class="form-control">
                  {% if (pim_uploadMaxType == 'M' or not pim_uploadMaxType) %} 
                  <option value="M" selected>MegaBytes (MB)</option>
                  <option value="K">KiloBytes (KB)</option>
                  {% else %}   
                  <option value="M" >MegaBytes (MB)</option>
                  <option value="K" selected>KiloBytes (KB)</option>
                  {% endif %} 								
                  </select>
                </div>                
              </div>                   
              </fieldset>
              <fieldset>
                <legend>{{ 'View Settings' }} </legend>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-status">{{ entry_language }} </label>
                  <div class="col-sm-4">
                    <select name="pim_language"  class="form-control">
                    <option value=""> EN </option>
                    {% for l in langs %}
                        <option value="{{ l }}" {% if l == pim_language%} {{ " selected" }}{% endif %}>{{ l|upper  }}</option>
										{% endfor %}
                     
                  </select>
                  </div>
                </div>  
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-status">{{ entry_dimensions }} </label>
                  <div class="col-sm-6">
                     <div class="col-sm-3">
                    <input type="text" class="form-control" name="pim_width" value="{{ pim_width }} " size="4" /> </div> <div class="col-sm-1">x</div> <div class="col-sm-3"><input type="text" class="form-control" name="pim_height" value="{{ pim_height }} " size="4" /></div>
                  </div>
                </div>                     
              </fieldset>
            </div>
            <div class="tab-pane" id="tab-volumes">
              <div class="tab-pane">
                <div class="table-responsive">
                  <table class="table table-bordered table-hover">
                    <thead>
                      <tr>
                        <td class="text-left">{{ column_name }} </td>
                        <td class="text-left">{{ column_description }}</td>
                        <td class="text-right">{{ column_action }} </td>
                      </tr>
                    </thead>
                    <tbody>
                      {% if volumes %} 
                      {% for extension in volumes %} 
                      <tr>
                        <td>{{ extension.name }} </td>
                        <td>{{ extension.text }} </td>
                        <td class="text-right">{% if not extension.installed %} 
                          <a href="{{ extension.install }} " data-toggle="tooltip" title="{{ button_install }} " class="btn btn-success"><i class="fa fa-plus-circle"></i></a>
													{% else %}   
                          <a onclick="confirm('{{ text_confirm }} ') ? location.href='{{ extension.uninstall }} ' : false;" data-toggle="tooltip" title="{{ button_uninstall }} " class="btn btn-danger"><i class="fa fa-minus-circle"></i></a>
                          {% endif %} 
                          {% if extension.installed %} 
                          <a href="{{ extension.edit }} " data-toggle="tooltip" title="{{ button_add }} " class="btn btn-primary"><i class="fa fa-plus"></i></a>
                          {% else %}   
                          <button type="button" class="btn btn-primary" disabled="disabled"><i class="fa fa-pencil"></i></button>
													{% endif %} 
                           </td>
                      </tr>
                        {% if extension.childs is not empty %}
                          {% for child in extension.childs %} 
                            <tr>
                              <td colspan="2">{{ extension.name }}  > <b>({{ child.name }})</b></td>
                              <td class="text-right">
                                <a onclick="confirm('{{ text_confirm }} ') ? location.href='{{ child.delete }} ' : false;" data-toggle="tooltip" title="{{ button_delete }} " class="btn btn-danger"><i class="fa fa-trash-o"></i></a>
                                <a href="{{ child.edit }} " data-toggle="tooltip" title="{{ button_edit }} " class="btn btn-primary"><i class="fa fa-pencil"></i></a>
                            
                              </td>
                            </tr>
                          {% endfor %}
												{% endif %}                          
                       {% endfor %}											 
                       {% else %}   
                      <tr>
                        <td class="text-center" colspan="2">{{ text_no_results }} </td>
                      </tr>
                      {% endif %}    
                    </tbody>
                  </table>
                </div>                                 
            </div>
          </div>            
          <div class="tab-pane" id="tab-modules">
          <div class="table-responsive">
            <table class="table table-bordered table-hover">
              <thead>
                <tr>
                  <td class="text-left">{{ column_name }} </td>
                  <td class="text-left">{{ column_description }}</td>
                  <td class="text-right">{{ column_action }} </td>
                </tr>
              </thead>
              <tbody>
                {% if extensions %} 
                {% for extension in extensions %} 
                <tr>
                  <td>{{ extension.name }} </td>
                  <td>{{ extension.text }} </td>
                  <td class="text-right">{% if not extension.installed %} 
                    <a href="{{ extension.install }} " data-toggle="tooltip" title="{{ button_install }} " class="btn btn-success"><i class="fa fa-plus-circle"></i></a>
                    {% else %}   
                    <a onclick="confirm('{{ text_confirm }} ') ? location.href='{{ extension.uninstall }} ' : false;" data-toggle="tooltip" title="{{ button_uninstall }} " class="btn btn-danger"><i class="fa fa-minus-circle"></i></a>
                    {% endif %} 
                    {% if extension.installed %} 
                    <a href="{{ extension.edit }} " data-toggle="tooltip" title="{{ button_edit }} " class="btn btn-primary"><i class="fa fa-pencil"></i></a>
                    {% else %}   
                    <button type="button" class="btn btn-primary" disabled="disabled"><i class="fa fa-pencil"></i></button>
										{% endif %} 
                     </td>
                </tr>
                 {% endfor %}
                 {% else %}   
                <tr>
                  <td class="text-center" colspan="2">{{ text_no_results }} </td>
                </tr>
                 {% endif %} 
              </tbody>
            </table>
          </div>                                 
          </div>
            
            <div class="tab-pane" id="tab-about">
      			  <h3>Welcome and thank you for purchsing our module!</h3>
      			  <div class="panel panel-default">
      			    <div class="panel-heading"><h4 class="panel-title">About This Module</h4></div>
      			    <div class="panel-body"><strong>Power Image Manager</strong> is another great module developed by <a href="http://bit.ly/1vHShWu" target="_blank">Sharley's</a></div>
      			  </div>
      			  <div class="panel panel-default">
      			    <div class="panel-heading"><h4 class="panel-title">Need Support?</h4></div>
      			    <div class="panel-body">
      			      <a href="mailto: support@sharleys.co.uk?subject=Power Image Manager (OCV2) support on <?php echo HTTP_CATALOG; ?>" class="btn btn-success"> <i class="fa fa-life-ring fa-lg"></i> Contact Us</a>
      			      <a href="http://on.fb.me/1inp4Ik" target="_blank" class="btn btn-primary"> <i class="fa fa-thumbs-up"></i> Follow us on Facebook</a>
      			    </div>
      			  </div>
      			  <div class="panel panel-default">
      			    <div class="panel-heading"><h4 class="panel-title">Happy about our modules?</h4></div>
      			    <div class="panel-body">Please give as your vote &amp; comment on <a href="http://bit.ly/1vHShWu" target="_blank">Opencart Extension Store</a></div>
      			  </div>
              </div>            
            </div>
          </div> 
        </form>
      </div>
    </div>
  </div>
